//
//@File    :	6.6_more_and.cpp
//@Time    :	2021/08/08 10:26:35
//@Auther  :	Sun Sheng
//@Contact :	970340843@qq.com
//@Desc    :	using the logical AND operator
//

#include <iostream>
const char * qualify[4] = 
{
    "10,000-meter race.\n",
    "mud tug-of-war.\n",
    "masters cance jousting.\n",
    "pie-throwing festival.\n"
};
int main()
{
    using namespace std;
    int age;
    cout<<"Enter you age in years: ";
    cin>>age;
    int index;

    if (age>17 && age<35)
    {
        index = 0;
    }
    else if(age>=35 && age<50)
    {
        index = 1;
    }
    else if(age>=50 && age<65)
    {
        index = 2;
    }
    else
    {
        index = 3;
    }
    cout<<"You qualify for the "<<qualify[index];
    system("pause");
    return 0;
}